<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
	<head>
		<title>Video Properties</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta content="noindex, nofollow" name="robots">
		<script src="../../dialog/common/fck_dialog_common.js" type="text/javascript"></script>
		<script src="fck_flv/fck_flv.js" type="text/javascript"></script>
		<script type="text/javascript">

document.write( FCKTools.GetStyleHtml( GetCommonDialogCss() ) ) ;

function updateYoutubePreview(link){
	var videoLink = link.split('&')[0];
	videoLink = videoLink.replace('watch?', '');
	videoLink = videoLink.replace('=', '/');
		
	if(videoLink.indexOf('http://') != 0){
		videoLink = 'http://' + videoLink;
	}
	
	GetE('txtYouTubeUrlHidden').value = videoLink;
	GetE('youTubePreviewDiv').innerHTML = '<object width="480" height="288"><param name="movie" value="' + videoLink + '"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="' + videoLink + '" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="288"></embed></object>';
}

		</script> 
	</head>
	<body scroll="no" style="OVERFLOW: hidden">
		<div id="divInfo">
			<table cellSpacing="1" cellPadding="1" width="100%" border="0">
				<tr>
					<td width="100%" class="Caption">
						<span fckLang="DlgVideoURL">URL (only FLV format is supported):</span>
						<input id="txtUrl" onblur="UpdatePreview();" style="WIDTH: 100%" type="text">
					</td>
				</tr>
				<tr>
					<td class="Caption">
						<span fckLang="DlgImgPreview" >Preview:</span>
						<iframe src="fck_flv/fck_flv_preview.html" style="display:block; width:450px; height:270px; margin-top:2px; border:1px solid #C7C7C7;" frameborder="0" marginheight="0" marginwidth="0"></iframe></td>
					</td>
				</tr>
			</table>
		</div>
		
		<!--
		<div id="divUpload" style="DISPLAY: none">
			<form id="frmUpload" method="post" target="UploadWindow" enctype="multipart/form-data" action="" onsubmit="return CheckUpload();">
				<div class="Caption">
				<span fcklang="DlgVidoUploadTitle">Upload (only FLV format is supported):</span><br />
				<input id="txtUploadFile" style="width: 100%; margin-top:2px;" type="file" size="40" name="NewFile" />
				<input id="btnUpload" type="submit" style="margin-top:16px;" class="Button" value="Send to Server" fcklang="DlgLnkBtnUpload" />
				<script type="text/javascript">
					document.write( '<iframe name="UploadWindow" style="display: none" src="' + FCKTools.GetVoidUrl() + '"><\/iframe>' ) ;
				</script>
			</div>
			</form>
		</div>
		-->
		
		<div id="divYouTube" style="display: none;">
			<table cellSpacing="1" cellPadding="1" width="100%" border="0">
				<tr>
					<td width="100%" class="Caption">
						<span fckLang="DlgYouTubePageURL" >URL:</span>
						<input id="txtYouTubeUrl" onchange="updateYoutubePreview(this.value);" style="width: 471px;" type="text" />
						<input type="hidden" id="txtYouTubeUrlHidden"/>
					</td>
				</tr>
				<tr>
					<td class="Caption">
						<span fckLang="DlgImgPreview" >Preview:</span>
						<div id="youTubePreviewDiv" style="padding-top: 5px;">&nbsp;</div>
					</td>
				</tr>
			</table>
		</div>
	</body>
</html>
